package com.cskaoyan.config;

import com.cskaoyan.interceptor.HandlerInterceptor1;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author stone
 * @date 2022/10/10 15:08
 */
// @EnableWebMvc
// @ComponentScan("com.cskaoyan.controller")
@Configuration
public class WebConfiguration implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new HandlerInterceptor1()); //.addPathPatterns("");
    }

    /*@Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

    }*/
}
